Eb = dim(1)/dim(2);
sigma = sqrt( Eb / (2 * 10 ^ (SNR / 10)));
noise = sigma*(randn(1,dim(2)/N)+1i*randn(1,dim(2)/N) );
codbpsk = codbpsk + noise;